{{#imports}}
    import { {{import}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
{{/imports}}
import {http} from '@/utils/http';
{{#operations}}
    export namespace {{baseName}}{
    {{#operation}}
        {{#contents}}
            /**
            {{#summary}}
                * @summary {{&summary}}
            {{/summary}}
            */
            export namespace {{nickname}} {
            //{{#allParams}}
                //    {{paramName}}: {{dataType}}
                //{{/allParams}}
            //classVarName:{{classVarName}}
            //basePath:{{basePath}}
            //basePathWithoutHost:{{basePathWithoutHost}}
            //contextPath:{{contextPath}}
            //baseName:{{baseName}}
            //modelPackage:{{modelPackage}}
            //importPath:{{importPath}}
            //classFilename:{{classFilename}}
            //classname:{{classname}}
            //pathPrefix:{{pathPrefix}}
            //path:{{path}}
            //pathParams:{{#pathParams}}{{.}}{{/pathParams}}
            //returnBaseType:{{returnBaseType}}
            //returnContainer:{{returnContainer}}
            //summary:{{summary}}
            //unescapedNotes:{{unescapedNotes}}
            //notes:{{notes}}
            //defaultResponse:{{defaultResponse}}
            //operationIdLowerCase:{{operationIdLowerCase}}
            //operationIdCamelCase:{{operationIdCamelCase}}
            //operationIdSnakeCase:{{operationIdSnakeCase}}
            //nickname:{{nickname}},operationId:{{operationId}}
            //appVersion:{{appVersion}}
            export interface IQueryParam {
            {{#queryParams}}
                {{paramName}}: {{dataType}}
            {{/queryParams}}

            }

            export interface IRequestBody {{#bodyParam}} extends {{{dataType}}}{{/bodyParam}}{
            }
            export interface IResponseData extends {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}{

            }

            const url = `{{{path}}}`
            {{#pathParams}}.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String({{paramName}})))
            {{/pathParams}};

            export const call=async ( queryParam?: IQueryParam,requestBody?: IRequestBody):Promise<IResponseData>=>{
                return await http.{{httpMethod}}
                <IResponseData,IQueryParam,IRequestBody>
                (url, queryParam, requestBody)
                }

                }
        {{/contents}}
    {{/operation}}
        }

{{/operations}}